package com.itheima.Junit_annotation;

public class Dog {
    public static void main(String[] args) throws ClassNotFoundException {

        //方法一：类名.Class
        Class<Dog> clazz = Dog.class;
        System.out.println(clazz);

        //方法二:Class.forName（类的路径+类名称）推荐使用：更加灵活，扩展性更强
        Class<?> aClass = Class.forName("com.itheima.Junit_annotation.Dog");
        System.out.println(aClass);

        //方法三：对象.getClass()
        Dog dog = new Dog();
        Class<? extends Dog> aClass1 = dog.getClass();
        System.out.println(aClass1);

    }
}
